<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="content-type" content="application/json">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>api-tool</title>
</head>

<body>
  <script>
    function dateToUnix() {
      let result = Date.parse("2020-11-20T10:00:00+08:00")
      return result
    }
    function unixToDate(unix) {
      let result = new Date(unix)
      return result
    }
    document.write(dateToUnix())
    // document.write('<br/>')
    // document.write(unixToDate(dateToUnix()))
  </script>
</body>

</html>